<LayoutTableSmall>
    <!-- 其他 -->
    <template slot="other"></template>
    <!-- 搜索 -->
    <template slot="search">
        <el-form :inline="true" label-position="left" label-width="80px" :model="mixinTable_tableSearchData"
            @submit.native.prevent class="demo-form-inline">
            <el-form-item>
                <el-input clearable v-model="mixinTable_tableSearchData.nickName" placeholder="请输入会员昵称"
                    @change="mixinTable_searchData" style="width:250px">
                    <el-button slot="append" icon="el-icon-search" @click="mixinTable_searchData()">
                    </el-button>
                </el-input>
            </el-form-item>
            <el-form-item>
                <el-popover width="430" trigger="click">
                    <div class="optionSearch">
                        <el-form label-position="left" label-width="80px" :model="mixinTable_tableSearchSenior">
                            <div class="box">
                                <el-form-item label="用户昵称">
                                    <el-input v-model="mixinTable_tableSearchData.nickName"></el-input>
                                </el-form-item>

                                <el-form-item label="手机号">
                                    <el-input v-model="mixinTable_tableSearchSenior.mobile.value"></el-input>
                                </el-form-item>

                                <el-form-item label="客户编号">
                                    <el-input v-model="mixinTable_tableSearchSenior.memberCode.value"></el-input>
                                </el-form-item>

                                <el-form-item label="用户标签">
                                    <el-select placeholder="请选择..."
                                        v-model="mixinTable_tableSearchSenior.tagIdLst.value" multiple
                                        style="width:100%">
                                        <el-option v-for="item in labelOptions" :key="item.value" :label="item.label"
                                            :value="item.value">
                                        </el-option>
                                    </el-select>
                                </el-form-item>

                                <el-form-item label="可用金额">
                                    <el-col :span="11">
                                        <el-input v-model="mixinTable_tableSearchSenior.usableAmountStart.value">
                                        </el-input>
                                    </el-col>
                                    <el-col class="line" :span="2" style="text-align: center;">-</el-col>
                                    <el-col :span="11">
                                        <el-input v-model="mixinTable_tableSearchSenior.usableAmountEmd.value">
                                        </el-input>
                                    </el-col>
                                </el-form-item>

                                <el-form-item label="消费金额">
                                    <el-col :span="11">
                                        <el-input v-model="mixinTable_tableSearchSenior.consumeAmountStart.value">
                                        </el-input>
                                    </el-col>
                                    <el-col class="line" :span="2" style="text-align: center;">-</el-col>
                                    <el-col :span="11">
                                        <el-input v-model="mixinTable_tableSearchSenior.consumeAmountEnd.value">
                                        </el-input>
                                    </el-col>
                                </el-form-item>

                                <el-form-item label="消费次数">
                                    <el-col :span="11">
                                        <el-input v-model="mixinTable_tableSearchSenior.consumeCountStart.value">
                                        </el-input>
                                    </el-col>
                                    <el-col class="line" :span="2" style="text-align: center;">-</el-col>
                                    <el-col :span="11">
                                        <el-input v-model="mixinTable_tableSearchSenior.consumeCountEnd.value">
                                        </el-input>
                                    </el-col>
                                </el-form-item>

                                <el-form-item label="售后金额">
                                    <el-col :span="11">
                                        <el-input v-model="mixinTable_tableSearchSenior.saleAfterAmountStart.value">
                                        </el-input>
                                    </el-col>
                                    <el-col class="line" :span="2" style="text-align: center;">-</el-col>
                                    <el-col :span="11">
                                        <el-input v-model="mixinTable_tableSearchSenior.saleAfterAmountEnd.value">
                                        </el-input>
                                    </el-col>
                                </el-form-item>

                                <el-form-item label="售后次数">
                                    <el-col :span="11">
                                        <el-input v-model="mixinTable_tableSearchSenior.saleAfterCountStart.value">
                                        </el-input>
                                    </el-col>
                                    <el-col class="line" :span="2" style="text-align: center;">-</el-col>
                                    <el-col :span="11">
                                        <el-input v-model="mixinTable_tableSearchSenior.saleAfterCountEnd.value">
                                        </el-input>
                                    </el-col>
                                </el-form-item>

                                <el-form-item label="消费时间">
                                    <el-col :span="11">
                                        <el-date-picker placeholder="开始时间"
                                            v-model="mixinTable_tableSearchSenior.consumeTimeStartStr.value"
                                            type="datetime" value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%;">
                                        </el-date-picker>
                                    </el-col>
                                    <el-col class="line" :span="2" style="text-align: center;">-</el-col>
                                    <el-col :span="11">
                                        <el-date-picker placeholder="结束时间"
                                            v-model="mixinTable_tableSearchSenior.consumeTimeEndStr.value"
                                            type="datetime" value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%;">
                                        </el-date-picker>
                                    </el-col>
                                </el-form-item>

                                <el-form-item label="注册时间">
                                    <el-col :span="11">
                                        <el-date-picker placeholder="开始时间"
                                            v-model="mixinTable_tableSearchSenior.createdTimeStartStr.value"
                                            type="datetime" value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%;">
                                        </el-date-picker>
                                    </el-col>
                                    <el-col class="line" :span="2" style="text-align: center;">-</el-col>
                                    <el-col :span="11">
                                        <el-date-picker placeholder="结束时间"
                                            v-model="mixinTable_tableSearchSenior.createdTimeEndStr.value"
                                            type="datetime" value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%;">
                                        </el-date-picker>
                                    </el-col>
                                </el-form-item>

                                <el-form-item label="成为会员">
                                    <el-col :span="11">
                                        <el-date-picker placeholder="开始时间"
                                            v-model="mixinTable_tableSearchSenior.levelTimeStartStr.value"
                                            type="datetime" value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%;">
                                        </el-date-picker>
                                    </el-col>
                                    <el-col class="line" :span="2" style="text-align: center;">-</el-col>
                                    <el-col :span="11">
                                        <el-date-picker placeholder="结束时间"
                                            v-model="mixinTable_tableSearchSenior.levelTimeEndStr.value" type="datetime"
                                            value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%;"></el-date-picker>
                                    </el-col>
                                </el-form-item>

                                <el-form-item label="性别">
                                    <el-radio-group v-model="mixinTable_tableSearchSenior.gender.value">
                                        <el-radio :label="null">不限</el-radio>
                                        <el-radio :label="0">未知</el-radio>
                                        <el-radio :label="1">男</el-radio>
                                        <el-radio :label="2">女</el-radio>
                                    </el-radio-group>
                                </el-form-item>
                            </div>

                            <div class="footer">
                                <el-button @click="mixinTable_searchSeniorReset()">
                                    清空搜索
                                </el-button>
                                <el-button type="primary" @click="mixinTable_searchData()">高级搜索</el-button>
                            </div>


                        </el-form>

                    </div>
                    <el-button slot="reference">高级筛选</el-button>
                </el-popover>
            </el-form-item>
        </el-form>
    </template>
    <!-- 功能 -->
    <template slot="function">
        <el-button @click="report()">导出报表</el-button>
        <!-- <el-popover width="430" trigger="click" style="margin-left:10px;">
            <div class="optionSearch">
                <el-form label-position="left" label-width="80px" :model="exportData">
                    <div class="box">
                        <el-form-item label="用户昵称">
                            <el-input v-model="exportData.nickName.value"></el-input>
                        </el-form-item>

                        <el-form-item label="手机号">
                            <el-input v-model="exportData.mobile.value"></el-input>
                        </el-form-item>

                        <el-form-item label="客户编号">
                            <el-input v-model="exportData.memberCode.value"></el-input>
                        </el-form-item>

                        <el-form-item label="用户标签">
                            <el-select placeholder="请选择..." v-model="exportData.tagIdLst.value" multiple
                                style="width:100%">
                                <el-option v-for="item in labelOptions" :key="item.value" :label="item.label"
                                    :value="item.value">
                                </el-option>
                            </el-select>
                        </el-form-item>

                        <el-form-item label="可用金额">
                            <el-col :span="11">
                                <el-input v-model="exportData.usableAmountStart.value">
                                </el-input>
                            </el-col>
                            <el-col class="line" :span="2" style="text-align: center;">-</el-col>
                            <el-col :span="11">
                                <el-input v-model="exportData.usableAmountEmd.value">
                                </el-input>
                            </el-col>
                        </el-form-item>

                        <el-form-item label="消费金额">
                            <el-col :span="11">
                                <el-input v-model="exportData.consumeAmountStart.value">
                                </el-input>
                            </el-col>
                            <el-col class="line" :span="2" style="text-align: center;">-</el-col>
                            <el-col :span="11">
                                <el-input v-model="exportData.consumeAmountEnd.value">
                                </el-input>
                            </el-col>
                        </el-form-item>

                        <el-form-item label="消费次数">
                            <el-col :span="11">
                                <el-input v-model="exportData.consumeCountStart.value">
                                </el-input>
                            </el-col>
                            <el-col class="line" :span="2" style="text-align: center;">-</el-col>
                            <el-col :span="11">
                                <el-input v-model="exportData.consumeCountEnd.value">
                                </el-input>
                            </el-col>
                        </el-form-item>

                        <el-form-item label="售后金额">
                            <el-col :span="11">
                                <el-input v-model="exportData.saleAfterAmountStart.value">
                                </el-input>
                            </el-col>
                            <el-col class="line" :span="2" style="text-align: center;">-</el-col>
                            <el-col :span="11">
                                <el-input v-model="exportData.saleAfterAmountEnd.value">
                                </el-input>
                            </el-col>
                        </el-form-item>

                        <el-form-item label="售后次数">
                            <el-col :span="11">
                                <el-input v-model="exportData.saleAfterCountStart.value">
                                </el-input>
                            </el-col>
                            <el-col class="line" :span="2" style="text-align: center;">-</el-col>
                            <el-col :span="11">
                                <el-input v-model="exportData.saleAfterCountEnd.value">
                                </el-input>
                            </el-col>
                        </el-form-item>

                        <el-form-item label="消费时间">
                            <el-col :span="11">
                                <el-date-picker placeholder="开始时间" v-model="exportData.consumeTimeStartStr.value"
                                    type="datetime" value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%;">
                                </el-date-picker>
                            </el-col>
                            <el-col class="line" :span="2" style="text-align: center;">-</el-col>
                            <el-col :span="11">
                                <el-date-picker placeholder="结束时间" v-model="exportData.consumeTimeEndStr.value"
                                    type="datetime" value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%;">
                                </el-date-picker>
                            </el-col>
                        </el-form-item>

                        <el-form-item label="注册时间">
                            <el-col :span="11">
                                <el-date-picker placeholder="开始时间" v-model="exportData.createdTimeStartStr.value"
                                    type="datetime" value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%;">
                                </el-date-picker>
                            </el-col>
                            <el-col class="line" :span="2" style="text-align: center;">-</el-col>
                            <el-col :span="11">
                                <el-date-picker placeholder="结束时间" v-model="exportData.createdTimeEndStr.value"
                                    type="datetime" value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%;">
                                </el-date-picker>
                            </el-col>
                        </el-form-item>

                        <el-form-item label="成为会员">
                            <el-col :span="11">
                                <el-date-picker placeholder="开始时间" v-model="exportData.levelTimeStartStr.value"
                                    type="datetime" value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%;">
                                </el-date-picker>
                            </el-col>
                            <el-col class="line" :span="2" style="text-align: center;">-</el-col>
                            <el-col :span="11">
                                <el-date-picker placeholder="结束时间" v-model="exportData.levelTimeEndStr.value"
                                    type="datetime" value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%;">
                                </el-date-picker>
                            </el-col>
                        </el-form-item>

                        <el-form-item label="性别">
                            <el-radio-group v-model="exportData.gender.value">
                                <el-radio :label="null">不限</el-radio>
                                <el-radio :label="0">未知</el-radio>
                                <el-radio :label="1">男</el-radio>
                                <el-radio :label="2">女</el-radio>
                            </el-radio-group>
                        </el-form-item>
                    </div>

                    <div class="footer">
                        <el-button @click="clearExport">
                            清空条件
                        </el-button>
                        <el-button type="primary" @click="exportTable">导出</el-button>
                    </div>


                </el-form>

            </div>
            <el-button slot="reference">导出报表</el-button>
        </el-popover> -->
    </template>
    <!-- 表格 -->
    <template slot="table">
        <el-table v-loading="mixinTable_loading" :data="mixinTable_tableData" border style="width: 100%;"
            :ref="mixinPage_vueName+'TableSmall'" default-expand-all height="100%" row-key="id"
            @selection-change="mixinTable_handleSelectionChangeTableSmall">
            <el-table-column type="selection" width="50" align="center"></el-table-column>
            <el-table-column type="index" width="70" :index="mixinTable_indexMethod" align="center" label="#">
            </el-table-column>
            <el-table-column prop="icon" label="头像" width="80px" align="center">
                <template slot-scope="scope">
                    <div class="albumUrl">
                        <imageBox :src="scope.row.icon"></imageBox>
                    </div>
                </template>
            </el-table-column>
            <el-table-column label="客户名称" width="100">
                <template slot-scope="scope">
                    {{scope.row.nickName || '无' }}
                </template>
            </el-table-column>
            <el-table-column label="手机号" width="100">
                <template slot-scope="scope">
                    {{scope.row.mobile || '-' }}
                </template>
            </el-table-column>
            <el-table-column label="会员等级" width="100" align="center">
                <template slot-scope="scope">
                    {{levelId2Text(scope.row.memberLevelId) || '无等级' }}
                </template>
            </el-table-column>
            <el-table-column label="注册时间" width="150">
                <template slot-scope="scope">
                    {{ $vFN.Utils.isEmpty(scope.row.createdTimeStr) == true ? "-" : $vFN.Utils.timestampFormat($vFN.Utils.stringToTimestamp(scope.row.createdTimeStr)) }}
                </template>
            </el-table-column>
            <el-table-column label="最近消费时间" width="150">
                <template slot-scope="scope">
                    {{ $vFN.Utils.isEmpty(scope.row.consumeTimeStr) == true ? "-" : $vFN.Utils.timestampFormat($vFN.Utils.stringToTimestamp(scope.row.consumeTimeStr)) }}
                </template>
            </el-table-column>
            <el-table-column prop="totalConsumeAmount" label="消费总额">
                <template slot-scope="scope">
                    {{$vFN.Tools.toMoneyCount(scope.row.totalConsumeAmount)}}
                </template>
            </el-table-column>

            <el-table-column prop="totalCount" label="消费次数"> </el-table-column>
            <el-table-column prop="usableAmount" label="当前余额">
                <template slot-scope="scope">
                    {{$vFN.Tools.toMoneyCount(scope.row.usableAmount)}}
                </template>
            </el-table-column>
            <el-table-column prop="" label="当前收益">
                <template slot-scope="scope">
                    {{ $vFN.Tools.toMoneyCount(scope.row.usableIncome) }}
                </template>
            </el-table-column>

            <el-table-column label="操作" width="150" align="center">
                <template slot-scope="scope">
                    <el-button @click="editBoxOpen({type:'detail',id:scope.row.id})">详情</el-button>
                    <el-button v-if="scope.row.status===0" type="danger" plain
                        @click="changeUseStatus([scope.row],'freeze')">冻结
                    </el-button>
                    <el-button v-if="scope.row.status===1" type="danger" plain
                        @click="changeUseStatus([scope.row],'unFreeze')">解冻
                    </el-button>


                </template>
            </el-table-column>
        </el-table>
    </template>
    <!-- 表格选项 -->
    <template slot="options">

        <el-button :disabled="mixinTable_selectTableData.length<=0" @click="batchAddTags">批量打标签</el-button>

        <el-popover placement="top" width="100" trigger="hover">
            <div>
                <el-button style="width:100%;" :disabled="mixinTable_selectTableData.length<=0" @click="updateAmount">余额
                </el-button>
            </div>
            <div v-for="(item,index) of assetTypeOptions" :key="index">
                <el-button style="width:100%;margin-top:5px" :disabled="mixinTable_selectTableData.length<=0"
                    @click="select(item)">{{item.label}}</el-button>
            </div>
            <el-button style="margin:0px 10px" slot="reference" :disabled="mixinTable_selectTableData.length<=0">批量修改资产
            </el-button>
        </el-popover>

        <el-button :disabled="mixinTable_selectTableData.length<=0"
            @click="changeUseStatus(mixinTable_selectTableData,'freeze')">
            批量冻结</el-button>
        <el-button :disabled="mixinTable_selectTableData.length<=0"
            @click="changeUseStatus(mixinTable_selectTableData,'unFreeze')">
            批量解冻</el-button>
        <el-button :disabled="mixinTable_selectTableData.length<=0"
            @click="mixinTable_clearSelectionChangeTableSmall()">取消选择
        </el-button>
    </template>
    <!-- 分页 -->
    <template slot="page">
        <el-pagination class="paginationStyle" v-if="mixinTable_pageData.total>0" background
            @current-change="mixinTable_pagingData($event)" :current-page="mixinTable_pageData.pageNum"
            :page-size.sync="$vFN.Constants.pageSize" layout="total, prev, pager, next,jumper"
            :total.sync="mixinTable_pageData.total">
        </el-pagination>
    </template>

</LayoutTableSmall>